-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚠️ Clean up "deprecated" variables/functions in v1alpha4 #4078
Conversation
Hi @Evalle. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/ok-to-test |
/milestone v0.4.0 |
Oh, might be this overlaps in parts with #3929 |
@fabriziopandini should I wait for #3929 to be merged and then rebase mine? Thanks! |
c934222
to
9da3750
Compare
I guess this can simplify this PR, so yes |
controlplane/kubeadm/api/v1alpha3/kubeadm_control_plane_types.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, rest looks good
@vincepri thanks, fixed |
@Evalle Feel free to squash the commits. Also there are some linter and test build errors. |
@wfernandes thanks for your comment, I'm waiting for #3929 to be merged first |
@Evalle Do you have time to rebase? |
@Evalle you need to run "make clean generate-bindata generate" and push the generated changes. I see changes when I run "make generate on this branch locally. |
I had a typo above, should be |
@CecileRobertMichon thank you, yes, I realized that. I run exactly ❯ make clean generate-bindata generate
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-bin
rm -rf bin
rm -rf hack/tools/bin
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-book
rm -rf ./docs/book/_book
hack/ensure-kustomize.sh
fetching kustomize@3.9.1
x kustomize
cd hack/tools; go build -tags=tools -o bin/go-bindata github.com/go-bindata/go-bindata/go-bindata
rm -rf cmd/clusterctl/config/manifest
/Users/user/Projects/cluster-api/hack/tools/bin/go-bindata -mode=420 -modtime=1 -pkg=cloudinit -o=bootstrap/kubeadm/internal/cloudinit/zz_generated.bindata.go.tmp bootstrap/kubeadm/internal/cloudinit/kubeadm-bootstrap-script.sh
cat ./hack/boilerplate/boilerplate.generatego.txt bootstrap/kubeadm/internal/cloudinit/zz_generated.bindata.go.tmp > bootstrap/kubeadm/internal/cloudinit/zz_generated.bindata.go
rm bootstrap/kubeadm/internal/cloudinit/zz_generated.bindata.go.tmp
# Package manifest YAML into a single file.
mkdir -p cmd/clusterctl/config/manifest/
/Users/user/Projects/cluster-api/hack/tools/bin/kustomize build cmd/clusterctl/config/crd > cmd/clusterctl/config/manifest/clusterctl-api.yaml
# Generate go-bindata, add boilerplate, then cleanup.
/Users/user/Projects/cluster-api/hack/tools/bin/go-bindata -mode=420 -modtime=1 -pkg=config -o=cmd/clusterctl/config/zz_generated.bindata.go cmd/clusterctl/config/manifest/ cmd/clusterctl/config/assets
cat ./hack/boilerplate/boilerplate.generatego.txt cmd/clusterctl/config/zz_generated.bindata.go > cmd/clusterctl/config/manifest/manifests.go
cp cmd/clusterctl/config/manifest/manifests.go cmd/clusterctl/config/zz_generated.bindata.go
# Cleanup the manifest folder.
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-bindata
rm -rf cmd/clusterctl/config/manifest
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-manifests
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-core-manifests
cd hack/tools; go build -tags=tools -o bin/controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
paths=./api/... \
paths=./controllers/... \
paths=./exp/api/... \
paths=./exp/controllers/... \
paths=./exp/addons/api/... \
paths=./exp/addons/controllers/... \
crd:crdVersions=v1 \
rbac:roleName=manager-role \
output:crd:dir=./config/crd/bases \
output:webhook:dir=./config/webhook \
webhook
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
paths=./cmd/clusterctl/api/... \
crd:crdVersions=v1 \
output:crd:dir=./cmd/clusterctl/config/crd/bases
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-kubeadm-bootstrap-manifests
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
paths=./bootstrap/kubeadm/api/... \
paths=./bootstrap/kubeadm/controllers/... \
crd:crdVersions=v1 \
rbac:roleName=manager-role \
output:crd:dir=./bootstrap/kubeadm/config/crd/bases \
output:rbac:dir=./bootstrap/kubeadm/config/rbac \
output:webhook:dir=./bootstrap/kubeadm/config/webhook \
webhook
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-kubeadm-control-plane-manifests
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
paths=./controlplane/kubeadm/api/... \
paths=./controlplane/kubeadm/controllers/... \
crd:crdVersions=v1 \
rbac:roleName=manager-role \
output:crd:dir=./controlplane/kubeadm/config/crd/bases \
output:rbac:dir=./controlplane/kubeadm/config/rbac \
output:webhook:dir=./controlplane/kubeadm/config/webhook \
webhook
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-go
go generate ./...
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-go-core
cd hack/tools; go build -tags=tools -o bin/conversion-gen k8s.io/code-generator/cmd/conversion-gen
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./api/... \
paths=./exp/api/... \
paths=./exp/addons/api/... \
paths=./cmd/clusterctl/...
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-generated-conversions SRC_DIRS="./api/v1alpha3,./exp/api/v1alpha3,./exp/addons/api/v1alpha3"
(IFS=','; for i in ./api/v1alpha3,./exp/api/v1alpha3,./exp/addons/api/v1alpha3; do find $i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
/Users/user/Projects/cluster-api/hack/tools/bin/conversion-gen \
--input-dirs=./api/v1alpha3 \
--build-tag=ignore_autogenerated_core_v1alpha3 \
--output-file-base=zz_generated.conversion \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
2021/03/09 09:51:11 gopathwalk: scanning directory /Users/user/go/pkg/mod: readdirent: interrupted system call
/Users/user/Projects/cluster-api/hack/tools/bin/conversion-gen \
--input-dirs=./exp/api/v1alpha3 \
--input-dirs=./exp/addons/api/v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
--output-file-base=zz_generated.conversion \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
2021/03/09 09:54:53 gopathwalk: scanning directory /Users/user/go/pkg/mod/go.opencensus.io@v0.22.3: readdirent: interrupted system call
2021/03/09 09:55:15 gopathwalk: scanning directory /Users/user/go/pkg/mod: open /Users/user/go/pkg/mod/k8s.io/client-go@v0.19.2/deprecated/typed/apps/v1beta1: interrupted system call
2021/03/09 09:55:32 gopathwalk: scanning directory /Users/user/go/pkg/mod: readdirent: interrupted system call
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-go-kubeadm-bootstrap
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./bootstrap/kubeadm/api/... \
paths=./bootstrap/kubeadm/types/...
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/api"
(IFS=','; for i in ./bootstrap/kubeadm/api; do find $i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
/Users/user/Projects/cluster-api/hack/tools/bin/conversion-gen \
--input-dirs=./bootstrap/kubeadm/api/v1alpha3 \
--build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
--output-file-base=zz_generated.conversion \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-go-kubeadm-control-plane
/Users/user/Projects/cluster-api/hack/tools/bin/controller-gen \
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./controlplane/kubeadm/api/...
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-generated-conversions SRC_DIRS="./controlplane/kubeadm/api"
(IFS=','; for i in ./controlplane/kubeadm/api; do find $i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
/Users/user/Projects/cluster-api/hack/tools/bin/conversion-gen \
--input-dirs=./controlplane/kubeadm/api/v1alpha3 \
--build-tag=ignore_autogenerated_kubeadm_controlplane_v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3,sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 \
--output-file-base=zz_generated.conversion \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
2021/03/09 10:03:47 gopathwalk: scanning directory /Users/user/go/pkg/mod/github.com/gogo/protobuf@v1.3.2: readdirent: interrupted system call
2021/03/09 10:03:50 gopathwalk: scanning directory /Users/user/go/pkg/mod: open /Users/user/go/pkg/mod/golang.org/x/tools@v0.0.0-20200724172932-b5fc9d354d99/cmd/callgraph: interrupted system call
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-bindata
rm -rf cmd/clusterctl/config/manifest
# Package manifest YAML into a single file.
mkdir -p cmd/clusterctl/config/manifest/
/Users/user/Projects/cluster-api/hack/tools/bin/kustomize build cmd/clusterctl/config/crd > cmd/clusterctl/config/manifest/clusterctl-api.yaml
# Generate go-bindata, add boilerplate, then cleanup.
/Users/user/Projects/cluster-api/hack/tools/bin/go-bindata -mode=420 -modtime=1 -pkg=config -o=cmd/clusterctl/config/zz_generated.bindata.go cmd/clusterctl/config/manifest/ cmd/clusterctl/config/assets
cat ./hack/boilerplate/boilerplate.generatego.txt cmd/clusterctl/config/zz_generated.bindata.go > cmd/clusterctl/config/manifest/manifests.go
cp cmd/clusterctl/config/manifest/manifests.go cmd/clusterctl/config/zz_generated.bindata.go
# Cleanup the manifest folder.
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean-bindata
rm -rf cmd/clusterctl/config/manifest
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C test/infrastructure/docker generate
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-manifests
hack/tools/bin/controller-gen \
paths=./api/... \
paths=./exp/api/... \
paths=./exp/controllers/... \
paths=./controllers/... \
crd:crdVersions=v1 \
rbac:roleName=manager-role \
output:crd:dir=./config/crd/bases \
output:webhook:dir=./config/webhook \
webhook
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-go
hack/tools/bin/controller-gen \
object:headerFile=../../../hack/boilerplate/boilerplate.generatego.txt \
paths=./api/... \
paths=./exp/api/...
(IFS=','; for i in "./api/v1alpha3,./exp/api/v1alpha3"; do find $i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
hack/tools/bin/conversion-gen \
--input-dirs=./api/v1alpha3 \
--input-dirs=./exp/api/v1alpha3 \
--build-tag=ignore_autogenerated_capd_v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
--output-file-base=zz_generated.conversion \
--go-header-file=../../../hack/boilerplate/boilerplate.generatego.txt
2021/03/09 10:07:39 gopathwalk: scanning directory /Users/user/go/pkg/mod: readdirent: interrupted system call The last ❯ go version
go version go1.15.7 darwin/amd64 |
you need to update to go 1.16 |
Thanks, @CecileRobertMichon With $ go version
go1.16 darwin/amd64
$ make clean generate-bindata generate
...
goroutine 1 [running]:
k8s.io/gengo/parser.(*Builder).AddDirTo(0xc00006b630, 0xc0000d8b54, 0x3f, 0xc0004d0008, 0x0, 0x0)
/Users/user/go/pkg/mod/k8s.io/gengo@v0.0.0-20201214224949-b6c5ce23f027/parser/parse.go:272 +0xa5
k8s.io/gengo/generator.(*Context).AddDir(...)
/Users/user/go/pkg/mod/k8s.io/gengo@v0.0.0-20201214224949-b6c5ce23f027/generator/generator.go:246
k8s.io/code-generator/cmd/conversion-gen/generators.Packages(0xc0004d0000, 0xc00010cf00, 0x13733f7, 0x6, 0xc0004d0000)
/Users/user/go/pkg/mod/k8s.io/code-generator@v0.21.0-beta.0/cmd/conversion-gen/generators/conversion.go:307 +0x1199
k8s.io/gengo/args.(*GeneratorArgs).Execute(0xc00010cf00, 0xc000075080, 0x13733f7, 0x6, 0x13a1650, 0xc000116b40, 0x2)
/Users/user/go/pkg/mod/k8s.io/gengo@v0.0.0-20201214224949-b6c5ce23f027/args/args.go:206 +0x1a9
main.main()
/Users/user/go/pkg/mod/k8s.io/code-generator@v0.21.0-beta.0/cmd/conversion-gen/main.go:129 +0x365
make[2]: *** [generate-go] Error 2
make[1]: *** [generate] Error 2
make: *** [generate] Error 2 ^ this with the latest changes from the upstream, may I ask you to push the files generated on your machine to my branch? |
2fb0558
to
a336001
Compare
Love to see this type of cleanup. |
@Evalle looks like you figured it out? PR looks good now, thanks for taking care of this! |
a336001
to
e9e3503
Compare
squashed the commits |
/lgmt |
@Evalle: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Clean up "deprecated" variables/functions in v1alpha4
Which issue(s) this PR fixes
Fixes #4005
Dear reviewers
Please take a closer look at this, I could miss something.
Thank you!